﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ProductListModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<div class="pro-relate">
    <div class="caption">
        <h3><%=ViewData["Title"]%></h3>
    </div>
    <div id="list_sfam">
	    <ul>
    	    <%foreach (var item in Model.Products)
           { %>
    	    <li>
       	        <div class="bg_img">
       	            <a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>">
                        <% string imgPath = (item.ImagePath != null && item.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(item.ID, 187, 187, item.ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
                        <img src="<%=imgPath %>" title="<%=item.Name %>" alt="<%=item.Name %>" width="187px" height="187px"" />
                     </a>
       	        </div>
                <h3><a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>"><%=Html.Encode(item.Name) %></a></h3>
                <div>
                    <span class="t_red"><strong><%=string.Format("{0:0,0}",item.UnitPrice) %> ₫</strong></span>
                    <a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>"><img src="/Images/mq/btn_detail.png" title="<%=item.Name %>" alt="<%=item.Name %>" style="vertical-align:middle" /></a>
                </div>
            </li>
            <%} %>
        </ul>
    </div>
</div>
